#ifndef __DEVICE_MANAGER_H__
#define __DEVICE_MANAGER_H__

#include <HAL/deviceInterface.h>
#include <HAL/hal.h>

#include <boost/property_tree/ptree.hpp>
#include <boost/shared_ptr.hpp>

#include <vector>
#include <string>

namespace ECG
{

namespace HAL
{

    class DevManager{
    public:
        std::vector<DevicePtr>& getDevs()
        {
            return devVec;
        }
        static DevManagerPtr instance();
        void setConfigurePath(std::string path); // setting xml file path
        bool loadDevice(); // parse xml file,and mk device instance
        ~DevManager();
    private:
        DevManager(std::string xmlPath);
        bool mkDevInstanc();
        static DevManagerPtr m_devManager;
        std::string confPath; // xml file path
        std::vector<DevicePtr> devVec; // device instance array
        boost::property_tree::ptree rootTree; // all device xml node
    };


}


}



#endif //__DEVICE_MANAGER_H__